<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 熊义 <34512664@qq.com>
// +----------------------------------------------------------------------
namespace app\xmgl\controller;

use cmf\controller\AdminBaseController;

/**
 * Class ZzjgController 组织机构管理
 * @package app\xmgl\controller
 * @adminMenuRoot(
 *     'name'   =>'组织机构管理',
 *     'action' =>'default',
 *     'parent' =>'',
 *     'display'=> true,
 *     'order'  => 10000,
 *     'icon'   =>'cogs',
 *     'remark' =>'组织机构管理'
 * )
 */
class ZzjgController extends AdminBaseController
{
    /**
     * 组织机构首页
     * @adminMenu(
     *     'name'   => '组织机构首页',
     *     'parent' => 'xmgl/Zzjg/default',
     *     'display'=> true,
     *     'hasView'=> true,
     *     'order'  => 10000,
     *     'icon'   => '',
     *     'remark' => 'index',
     *     'param'  => '组织机构首页'
     * )
     * @return mixed
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function index()
    {
        return $this->fetch();
    }

    /**
     * 添加组织机构
     * @adminMenu(
     *     'name'   => '添加组织机构',
     *     'parent' => 'index',
     *     'display'=> true,
     *     'hasView'=> true,
     *     'order'  => 10000,
     *     'icon'   => '',
     *     'remark' => '添加组织机构页',
     *     'param'  => ''
     * )
     * @return mixed
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function add(){
        return $this->fetch();
    }

    /**
     * 编辑组织机构
     * @adminMenu(
     *     'name'   => '编辑组织机构',
     *     'parent' => 'index',
     *     'display'=> true,
     *     'hasView'=> true,
     *     'order'  => 10000,
     *     'icon'   => '',
     *     'remark' => '编辑组织机构',
     *     'param'  => ''
     * )
     * @return mixed
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function edit(){
        return $this->fetch();
    }
}
